<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="MyApp">
        <p>Original message:"{{message}}"</p>
        <p>Computed reversed message:"{{reversedMessage}}"</p>
    </div>
    <div id="app">
        <p>Original message:"{{message}}"</p><br>
        <p>Computed reversed message:"{{reversedMessage}}"</p><br>
        <a v-bind:[attrname]="url">百度一下</a>
        <span v-if="seen">上海迪士尼</span><br>
        <span v-if>北京</span><br>
        <span>{{content}}</span><br>
        <span v-html="content"></span><br>
        <button v-bind:disabled="isButtonDisabled">Button</button>
    </div>
    <script src="./vue.js"></script>
    <script>
        var a = new Vue({
            el:'MyApp',
            data:{
                message:'Hello'
            },
            computed:{
                reversedMessage:function(){
                    return this.message.split('').reverse().join('')
                }
            }
        })
        var c = new Vue({
            el:'#app',
            data:{
                content:'<h1>今天是周六，( •̀ ω •́ )</h1>',
                isButtonDisabled:false,//值为true时，button不可用。值为false时，button可用
                seen:true,
                url:'http://baidu.com',
                attrname:'href',
                message:'Hello'
            },
            computed:{
                reversedMessage:function(){
                    return this.message.split('').reverse().join('')
                }
            }
        })
    </script>
</body>
</html>